""" Builds mcap.
"""

load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
    name = "mcap",
    hdrs = glob(
        [
            "include/**/*.inl",
            "include/**/*.hpp",
        ],
        exclude = [
            "include/mcap/reader.inl",
            "include/mcap/writer.inl",
        ],
    ),
    includes = ["include"],
    visibility = ["//visibility:public"],
    features = [
        "parse_headers",
    ],
    textual_hdrs = [
        "include/mcap/reader.inl",
        "include/mcap/writer.inl",
    ],
    copts = ["-std=c++17"],  # only needed for parse_headers
    deps = [
        "@lz4//:lz4_frame",
        "@zstd//:zstd"
    ],
)
